#!/bin/bash
echo "must run from \"tools\" directory! and stop eclipse automatic build while using this script."
#http://code.google.com/intl/nl/appengine/articles/soap.html
class=nl.boektrust.btsoep.server.wsdl.BrowseWsdl
clpth='../war/WEB-INF/classes'
resourcedir='../war'
outsourcedir='../src'
outdir='../war/WEB-INF/classes'
echo "about to do: wsgen -cp "$clpth" -wsdl -keep -r "$resourcedir" -d "$outdir" -s "$outsourcedir" $class"
wsgen -cp "$clpth" -wsdl -keep -r "$resourcedir" -d "$outdir" -s "$outsourcedir" $class
echo "FIX       <soap:address location=\"http://soaponix.appspot.com/BrowseSoapServlet\"/>"
#Like to have generated WSDL and XSD next to generated Java
cp ../war/BrowseWsdlService.wsdl ../src/nl/boektrust/btsoep/server/wsdl/jaxws/BrowseWsdlService.wsdl
cp ../war/BrowseWsdlService_schema1.xsd ../src/nl/boektrust/btsoep/server/wsdl/jaxws/BrowseWsdlService_schema1.xsd

